package b.i.e.a;

import android.content.Context;
import android.hardware.fingerprint.FingerprintManager;
import android.os.Build.VERSION;
import java.security.Signature;
import javax.crypto.Cipher;
import javax.crypto.Mac;

@Deprecated
/* compiled from: FingerprintManagerCompat */
public class b {
    public final Context a;

    /* compiled from: FingerprintManagerCompat */
    public static abstract class a {
    }

    /* compiled from: FingerprintManagerCompat */
    public static class b {
        public final Signature a;
        public final Cipher b;
        public final Mac c;

        public b(Signature signature) {
            this.a = signature;
            this.b = null;
            this.c = null;
        }

        public b(Cipher cipher) {
            this.b = cipher;
            this.a = null;
            this.c = null;
        }

        public b(Mac mac) {
            this.c = mac;
            this.b = null;
            this.a = null;
        }
    }

    public b(Context context) {
        this.a = context;
    }

    public static FingerprintManager a(Context context) {
        int i = VERSION.SDK_INT;
        if (i == 23) {
            return (FingerprintManager) context.getSystemService(FingerprintManager.class);
        }
        return (i <= 23 || !context.getPackageManager().hasSystemFeature("android.hardware.fingerprint")) ? null : (FingerprintManager) context.getSystemService(FingerprintManager.class);
    }

    public boolean b() {
        if (VERSION.SDK_INT < 23) {
            return false;
        }
        FingerprintManager a = a(this.a);
        if (a == null || !a.hasEnrolledFingerprints()) {
            return false;
        }
        return true;
    }

    public boolean c() {
        if (VERSION.SDK_INT < 23) {
            return false;
        }
        FingerprintManager a = a(this.a);
        if (a == null || !a.isHardwareDetected()) {
            return false;
        }
        return true;
    }
}
